package io.github.wanggit.website.demos.zipkin_service_4.service;

import io.github.wanggit.antrpc.commons.annotations.RpcAutowired;
import io.github.wanggit.antrpc.commons.annotations.RpcMethod;
import io.github.wanggit.antrpc.commons.annotations.RpcService;
import io.github.wanggit.website.demos.zipkin_api_1.BayService;
import io.github.wanggit.website.demos.zipkin_api_1.CheckService;
import org.springframework.beans.factory.annotation.Autowired;

@RpcService
public class BayServiceImpl implements BayService {

    @Autowired
    private TestTraceService testTraceService;

    @RpcAutowired
    private CheckService checkService;

    @RpcMethod
    @Override
    public String sayBay(String content) {
        testTraceService.listPersons();
        testTraceService.readMe();
        return checkService.check(testTraceService.testTrace("Bay: " + content));
    }
}
